package com.example.zhongcao.service;

import com.alibaba.fastjson.JSONObject;
import com.example.zhongcao.exception.InvalidParam;
import com.example.zhongcao.exception.User.InvalidOpenid;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface UserService {
    /**
     * code换取openid
     * @param appid 小程序appid
     * @param appsecret 小程序appsecret
     * @param code 小程序登录时获取的code
     * @return openid
     */
    public JSONObject codeToOpenid(String appid, String appsecret, String code) throws IOException, InvalidOpenid;

    public void sendQuestion(String openid, String question, List<MultipartFile> pics) throws InvalidParam;
}
